package com.pentakill.mo.auth.user.dao.impl;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.pentakill.mo.auth.user.dao.dao.UserDao;
import com.pentakill.mo.auth.user.vo.UserModel;
import com.pentakill.mo.util.base.BaseImpl;
import com.pentakill.mo.util.base.BaseQueryModel;

public class UserImpl extends BaseImpl<UserModel> implements UserDao{
	
	@Override
	protected void doQbc(DetachedCriteria criteria, BaseQueryModel qm) {
		// TODO Auto-generated method stub
		
	}

	public boolean userByN_P(UserModel user) {
		String hql = "from UserModel where loginID = ? and password = ?";
		List<UserModel> find = this.getHibernateTemplate().find(hql,user.getLoginID(),user.getPassword());
		if (find.size() == 0) {
			return false;
		}else {
			return true;
		}
	}

}
